home *** CD-ROM | disk | FTP | other *** search
/ FishMarket 1.0 / FishMarket v1.0.iso / fishies / 476-500 / disk_489 / automata / automata.doc < prev    next >
Text File  |  1992-05-06  |  43KB  |  884 lines

  1.  
  2.    1
  3.  
  4.                   Automata
  5.  
  6.      Copyright © 1991 by Jerry Mack.  All rights reserved.
  7.  
  8.  
  9.      Automata is an extremely versatile, cellular-automaton simulation.
  10.    Virtually every aspect of the simulation can be altered, saved and later
  11.    recalled.  Also, Automata supplies many powerful editing functions (e.g.
  12.    patterns, rotations, reflctions, and more) for creating and modifying
  13.    cell configurations.  Additional features include editable icons, an
  14.    immense variety of rules from which to choose, "music" which changes as
  15.    the cell configuration changes and methods to speed execution from 3 to
  16.    60 (or more) generations per second.
  17.  
  18.  
  19.    Introduction:
  20.  
  21.     A cellular automaton consists of the following: 1) a collection of
  22.    cells; 2) a set of states, important because each cell must be in one of
  23.    these states at all times; and 3) a set of rules which determine how the
  24.    cell-states "evolve" with time.
  25.  
  26.     The cells in Automata are arranged in a 100x100 array known as the
  27.    playfield.  Each cell occupies a small square in the playfield, and each
  28.    square has up to eight neighboring squares which touch it on a side or
  29.    corner.  Cells along the edges of the playfield have fewer than eight
  30.    neighbors, but they can be treated as if they have more neighbors by
  31.    connecting the edges.  The way in which the edges are connected is known
  32.    as the topology of the playfield.  More on topologies later.
  33.  
  34.     Take any cell in the playfield and call it the home cell.  Each home
  35.    cell has a neighborhood associated with it.    This neighborhood usually
  36.    consists of some or all of the eight cells surrounding the home cell.
  37.    Normally, each cell in the playfield has the same type of neighborhood.
  38.  
  39.     We can specify a "rule of evolution" for a cell based upon the home
  40.    cell's state and the states of its neighboring cells.  For example, we
  41.    might require that if the home cell and three of its neighbors are ON
  42.    during this generation, then the home cell will be ON during the next
  43.    generation.    However, if the home cell and MORE than three of its neighbors
  44.    are ON during this generation, then the home cell will be OFF during the
  45.    next generation.
  46.  
  47.     Another example can be taken from John Conway's popular game known
  48.    as "Life":
  49.  
  50.      1) If the home cell is ON and two or three of its neighbors are
  51.         on, the home cell will be ON during the next generation.
  52.  
  53.      2) If the home cell is OFF and three of its neighbors are on, the
  54.         home cell will be ON during the next generation.
  55.  
  56.      3) Otherwise, the home cell will be OFF during the next generation.
  57.  
  58.     The neighborhood in Life consists of all eight cells surrounding the
  59.    home cell, and each cell can be in one of two states: ON or off.  This
  60.    simple rule gives rise to patterns which spin, crawl, breed, evolve and
  61.    perform other amazing feats.  Remarkable, when you consider that these
  62.    patterns are no more than bits in the computer's memory.
  63.  
  64.  
  65.    2
  66.  
  67.     To observe some of these Life patterns, perform the following
  68.    actions immediately after starting Automata:
  69.  
  70.      1) Click on the Evolution gadget, putting you in Evolution mode.
  71.  
  72.      2) Click on the Life gadget, giving you access to the Life models.
  73.         The default rules (for the black background) are Conway's rules.
  74.  
  75.      3) Click on the Accept gadget, returning you to the Main screen.
  76.  
  77.      4) Click on the Population gadget so you can edit the cell patterns.
  78.  
  79.      5) Click on the Randomization gadget (middle of the screen at the
  80.         (right edge, a box with a bunch of dots in it) once or twice.
  81.         This will add cell states at random locations on the playfield.
  82.         Alternatively, you may click the left mouse button when the
  83.         pointer is in the playfield.  This will turn ON or OFF the cell
  84.         underneath the pointer.  If you hold down the left mouse-button
  85.         while moving the mouse, you will continuously change the cells
  86.         over which the pointer passes.
  87.  
  88.      6) Click on the Accept gadget to return to the Main screen.
  89.  
  90.      7) Click on the Flag gadget to start the evolution.
  91.  
  92.    You can stop the action (and regain control of Automata) by clicking the
  93.    left mouse button.
  94.  
  95.     Among the many features of Automata is the use of four different ON
  96.    states instead of just one.    Thus, your rules of evolution can allow ON
  97.    states to evolve into other ON states or into the OFF state.  Also, you
  98.    may have up to four different automata on the playfield, each with its
  99.    own rule of evolution.  Thus if you put the black automaton on the left
  100.    half of the screen and the white automaton on the right half, then any
  101.    patterns which cross from one side to the other will evolve differently
  102.    than before.  Just how differently depends on your choice of rules.
  103.  
  104.     The Evolution screen was designed to allow you to quickly change your
  105.    rules and observe how the patterns respond.    Likewise, many powerful and
  106.    easy-to-use commands have been placed in the Populate screen, eliminating
  107.    much of the tedium in creating and modifying patterns.
  108.  
  109.     The Music screen gives you considerable leeway in "composing" the
  110.    music (noise?) the patterns can create.  Unfortunately, I did not have
  111.    time to implement the digitized sounds I had hoped to use (violin, flute,
  112.    etc.).  Thus, only a simple sine-wave pattern is available for sounds.
  113.    If there is enough interest, I may correct this deficiency.
  114.  
  115.     The Icons screen allows you to change the icons for each state.  The
  116.    different icon sizes represent the different zoom factors available.
  117.  
  118.     You will need at least 768K of memory to run Automata. Sorry...
  119.  
  120.     Finally, there are many things I dislike about Automata, (the bugs,
  121.    the region-handling, the music(?), etc.) but I can't spend any more time
  122.    on this project.  I hope you can find some enjoyment from Automata.
  123.  
  124.                         Jerry Mack
  125.  
  126.  
  127.    3
  128.  
  129.    I) Main Screen
  130.  
  131.      Let me cover the features of the right hand side of the display,
  132.    known as the control panel.    First, there is the Topology gadget, which
  133.    allows you to select what type of topology to assign to the playfield.
  134.    Clicking on this gadget creates a pop-up menu underneath the pointer,
  135.    allowing you to choose one of fifteen topologies.  The topology assigned
  136.    to the playfield when Automata starts up is the Torus, which connects
  137.    the top and bottom edges together, as well as the left and right edges
  138.    together.  Thus, the cells along the top edge have the cells along the
  139.    bottom edge as their neighbors and vice-versa (similarly for the left
  140.    and right edges).  Cells at the corners of a Torus have neighbors on
  141.    every edge of the playfield.
  142.  
  143.      The available topologies are as follows:
  144.  
  145.    Square: Do not connect the edges;
  146.  
  147.    R Cylinder: Connect the top row to the bottom row;
  148.  
  149.    C Cylinder: Connect the left column to the right column;
  150.  
  151.    R Mobius Strip: Twist-connect the top row to the bottom row (connect
  152.            the lower right cell to the upper left cell, etc.);
  153.  
  154.    C Mobius Strip: Twist-connect the left column to the right column;
  155.  
  156.    Torus: Connect the top row to the bottom row and the left column to the
  157.       right column;
  158.  
  159.    UL Cone: Connect the left column to the top row;
  160.  
  161.    UR Cone: Connect the right column to the top row;
  162.  
  163.    LL Cone: Connect the left column to the bottom row;
  164.  
  165.    LR Cone: Connect the right column to the bottom row;
  166.  
  167.    ULLR Sphere: Connect the left column to the top row and the right column
  168.         to the bottom row;
  169.  
  170.    LLUR Sphere: Connect the left column to the bottom row and the right
  171.         column to the top row;
  172.  
  173.    R Klein Bottle: Connect the left column to the right column and
  174.            twist-connect the top row to the bottom row;
  175.  
  176.    C Klein Bottle: Connect the top row to the bottom row and twist-connect
  177.            the left column to the right column;
  178.  
  179.    Projective Plane: Twist-connect the top row to the bottom row and the
  180.              left column to the right column.
  181.    Note:
  182.     R    means row-connected,
  183.     C    means column-connected,
  184.     UL   means upper-left-connected,
  185.     UR   means upper-right-connected,
  186.     LL   means lower-left-connected,
  187.     LR   means lower-right-connected,
  188.     ULLR means upper-left-to-lower-right connected and
  189.     LLUR means lower-left-to-upper-right connected.
  190.  
  191.  
  192.    4
  193.  
  194.      Next, the Neighborhood gadget allows you choose which of the home
  195.    cell's nearby cells will be considered as neighbors.  Clicking on the
  196.    Neighborhood gadget displays a pop-up menu beneath the pointer, allowing
  197.    you to easily choose a neighborhood.  The dark cell in the center of each
  198.    neighborhood represents the home cell, and the light cells surrounding
  199.    it represent which cells will be considered as its neighbors during
  200.    evolution.
  201.  
  202.      The Switching item in the Neighborhood pop-up menu demonstrates
  203.    another feature of Automata: dual neighborhoods.  You can have Automata
  204.    switch between neighborhoods automatically as often as you wish.  The
  205.    current neighborhood is indicated by the triangular pointer between the
  206.    two neighborhood icons (underneath the Neighborhood gadget).  Choosing
  207.    the Switching item brings up a requester, allowing you to change the
  208.    current neighborhood and to decide when to switch neighborhoods.
  209.  
  210.      The Sound gadget (below the Flag gadget) allows you to turn on
  211.    (and off, fortunately) the "music" feature of Automata.  Each of the
  212.    four audio channels of the Amiga is assigned an ON state.  The note and
  213.    volume output by each audio channel is determined by the number of cells
  214.    in the channel's associated state.
  215.  
  216.      The Flag gadget, as mentioned, allows you to start and stop the
  217.    simulation.    Actually, any mouse click will stop the simulation.
  218.    Another method of starting/stopping the simulation is the Single-step
  219.    menu item under the Special menu.  This item starts the simulation for
  220.    one cycle and then stops it.  Use this when you want to examine closely
  221.    how a particular configuration evolves.
  222.  
  223.      The Multi-step menu item is also related to the Flag gadget, in
  224.    that you can set the number of generations Automata will evolve before
  225.    stopping when you click on the Flag gadget.    Thus, if you want the
  226.    simulation to stop every fifteen cycles, choose the Multi-step item,
  227.    enter "15" into the string gadget, and click on the Accept gadget.
  228.    Whenever you click on the Flag gadget, Automata will stop the simulation
  229.    after 15 cycles (or after a click of the left mouse-button).
  230.  
  231.      In case you didn't notice, I used the word cycles instead of
  232.    generations the past few paragraphs.  That is because the unit of
  233.    evolution in Automata is the cycle.    The unit of evolution for each
  234.    state is the generation.  Thus, each state may take more than one cycle
  235.    before it evolves.  You can use this feature to create fast-breeding
  236.    states and slow-breeding states.  Be careful, though, as slow-breeding
  237.    states can be affected by other states (e.g. predators) while waiting to
  238.    evolve.  You choose the number of cycles each state waits before evolving
  239.    by selecting the Generations menu item under the Special menu.
  240.  
  241.      Next in line in the Special Menu is the Updates item, which allows
  242.    you to specify how many cycles to allow the playfield to evolve before
  243.    redrawing the display.  The default is to redraw the playfield every
  244.    cycle, so that you can observe all the changes.  If you only want to
  245.    observe every fifth cycle, then choose this menu item, type "5" into the
  246.    upper string gadget and select the Accept gadget.  Now, whenever you
  247.    turn on the simulation, the display will redrawn only once for every
  248.    five cycles of evolution.
  249.  
  250.  
  251.    5
  252.  
  253.      The Updates menu item is one way to speed up the evolution of
  254.    Automata.  A more effective way is the use of Evolve regions, which
  255.    restrict evolution to the region of the playfield you specify.
  256.    Selecting the Evolve region menu-item under the Special menu highlights
  257.    the current Evolve region, which is the entire playfield when you start
  258.    Automata.  If you press the left mouse button over one corner of the new
  259.    Evolve region, drag the mouse to the other corner and release the mouse
  260.    button, you will have specified a new Evolve region.  All evolution will
  261.    be restricted to this Evolve region, allowing substantial improvements
  262.    in execution speed.
  263.  
  264.      Note: when the Evolve region is visible, you may keep redrawing
  265.    the region until you are satisfied with it.    You can remove the Evolve
  266.    region display by clicking the mouse in the playfield, clicking on a
  267.    gadget or making a menu selection.
  268.  
  269.      The final item in the Special menu is the Screen to back item,
  270.    which allows you to access the other tasks running on your Amiga.  No
  271.    machine hogs here.
  272.  
  273.      The Display menu highlights the accounting features of Automata.
  274.    These dislplays slow down the simulation somewhat, but offer information
  275.    which will be of interest at various times during the simulation.
  276.  
  277.      The View menu allows you change your view of the playfield for
  278.    better inspection and/or population.  Specifically, you may zoom in (a
  279.    maximum of two times) or zoom out; pan left, right, up or down; and
  280.    you may quickly move to the corners or center of the playfield (useful
  281.    when you've zoomed in).
  282.  
  283.      The Project menu allows you to save and restore virtually every
  284.    feature of Automata.  A caveat is in order:    the file requester I am
  285.    currently using does not work well, making it difficult to create new
  286.    files. After several attempts to create a new file, it should send the
  287.    name to Automata even after you click on the Cancel gadget.    If you have
  288.    the requester re-examine the contents of the directory, you will find
  289.    your file and can restore it.  Alternatively, you may create a dummy file
  290.    from the shell and choose that file as you save file.
  291.  
  292.      I want to point out a final feature visible in the Main screen:
  293.    multiple automata.  As I mentioned, you can choose from an IMMENSE
  294.    variety of evolutionary rules.  What I didn't mention was that you can
  295.    have different rules applied at different cells in the playfield.
  296.    Automata allows you to have four sets of rules active, each set being
  297.    referred to as an automaton.  Thus each cell has an underlying automaton
  298.    affixed to it, as well as the state currently assigned to it.  The rules
  299.    assigned to a state do not change during evolution, for they determine
  300.    how the cell will change states as it evolves.  The states, of course
  301.    may or may not change as the cell evolves.  The different rules are
  302.    denoted by the underlying automaton icon assigned to each cell.  The
  303.    default icons are simply the colors black, dark grey, light grey and
  304.    white.  The state icons are drawn over the automaton icons, but the
  305.    automaton icons are always present, allowing you to determine which set
  306.    of rules apply at each cell in the playfield.
  307.  
  308.      The remaining gadgets in the Main screen (to the right of the Flag
  309.    and Sound gadgets) activate the other modes of Automata.  These modes
  310.    allow you to modify the rules, change the cell configurations, alter the
  311.    music created by the state configurations and modify the icons used to
  312.    represent the states and automata.
  313.  
  314.  
  315.    6
  316.  
  317.    II) Evolution Models
  318.  
  319.      The number of rules available with eight neighbors and five states
  320.    is IMMENSE (approximately 10^1730 or 10 followed by 1730 zeros).  Most
  321.    cellular-automaton simulations give you a choice of one rule, though
  322.    some give you up to a dozen or two.    Automata gives you a LOT more (e.g.,
  323.    the Ecosystem Model alone contains more than 10^67 different rules).
  324.  
  325.      With such an IMMENSE variety of rules from which to choose, you
  326.    need an easy and quick method of changing rules, since the whole point of
  327.    this simulation is discovering new types of evolution on an automaton
  328.    (and having fun, of course).  The last thing you want is to spend 15
  329.    minutes reading a manual every time you want to change a rule.  Thus, I
  330.    designed these models to be as intuitive and flexible as possible.
  331.  
  332.      All of the models have four icons displayed at the bottom of the
  333.    screen, left of the Accept gadget in the control panel.  These icons
  334.    allow you to have four separate sets of (evolution) rules present on
  335.    the playfield at any time.  Clicking on one of these icons brings up the
  336.    rules currently defined for the associated automaton.  You can then
  337.    change those rules and see what kind of configurations emerge.  To find
  338.    out which set of rules are in effect at any cell in the playfield, you
  339.    need only look at the underlying automaton icon for that cell.
  340.  
  341.      Because cells can be in several ON states, it is possible for a
  342.    cell to satisfy the conditions for more than one state at a time.  In
  343.    other words, a cell might be able to evolve into more than one state in
  344.    the next generation.  In order to resolve these conflicts as easily as
  345.    possible, any cell in such a quandary will be OFF in the next generation.
  346.  
  347.      All of the evolutionary models have two main menus: a Project menu,
  348.    with which you can save the current model or restore a saved model; and
  349.    the Icons menu, with which you can view the icons in whatever size you
  350.    are most familiar.  Following are brief descriptions of each of the
  351.    models available in Automata, from which you choose evolution rules.
  352.  
  353.  
  354.                 Life Model
  355.  
  356.      The icons on the left represent the ON states, and the numbers to
  357.    their right represent the number of neighbors in that state required for
  358.    the birth or continued life of a cell.
  359.  
  360.      For example, suppose the number 3 lies below the egg and to the
  361.    right of the first state-icon.  Then any cell which is OFF and has three
  362.    neighbors in the first state will itself be in the first state the next
  363.    generation.    Likewise, suppose the numbers 2,3 lie below the sunrise-by-
  364.    the-river icon and to the right of the first state-icon.  Then any cell
  365.    which is in the first state must have either two or three neighbors in
  366.    the first state to remain in the first state the next generation.
  367.  
  368.      In the default rules, all of the states behave the same in a given
  369.    automaton, though they behave differently for different automata:
  370.  
  371.              Neighbors of same state    Neighbors of same state
  372.      Automaton   needed for a birth     needed to avoid death
  373.  
  374.      black               3              2 or 3
  375.      dark gray           2              2 or 3
  376.      light gray           2              3 or 4
  377.      white               2              1 or 2
  378.  
  379.  
  380.    7
  381.  
  382.      To change any of the values for the birth or life requirements,
  383.    click on the left or right arrow in the appropriate row and column.
  384.    The left arrow decreases the value(s) above it, while the right arrow
  385.    increases the value(s).  Any changes you make with the arrows apply only
  386.    to the current automaton.  To change the rules for another automaton,
  387.    simply click on the gadget surrounding the desired automaton.
  388.  
  389.  
  390.                  Ecosystem Model
  391.  
  392.      The icons on the lower left of the screen represent the ON states
  393.    available.  Clicking on one of these brings up the rules applying to
  394.    that state when it is in the selected automaton.  The egg and sunrise
  395.    icons have the same meaning as in the Life Model, only now you have a
  396.    wider selection of neighbors for them.  When the button image behind a
  397.    number disappears, that number has been selected.  Thus, the birth and
  398.    life rules for the first (leftmost) state in the first (black) automaton
  399.    are the same as in the Life Model: three like neighbors for a birth and
  400.    two or three like neighbors to avoid death.
  401.  
  402.      The other two icons represent a predator (far left) and a virus (to
  403.    the immediate right of the predator).  The three states below these two
  404.    icons represent the states other than the selected state.  The selected
  405.    state can prey upon or infect any of these states.  The numbers below the
  406.    predator and virus icons represent the number of neighbors required for
  407.    the selected state to prey upon or infect another state.  If a cell is
  408.    preyed upon, that cell will be OFF next generation.    If a cell is
  409.    infected, that cell will become the selected state next generation.    As
  410.    always, conflicts result in the cell being OFF next generation.
  411.  
  412.      As an example, take the predator and infection rules for the first
  413.    (black) automaton.  If you select either of the first two states (lower
  414.    left of the screen), you will find that neither of them preys upon or
  415.    infects the other states.  However, if you select the third state, you
  416.    will find that it can infect the each of the remaining states.  Select
  417.    the prey state at the upper-left of the screen to examine/modify the way
  418.    in which the third state preys/infects the other states.  The default
  419.    rules are as follows: if a cell in state #3 has 7 or 8 neighbors in state
  420.    #1, then that cell will be in state #1 next generation; if a cell in state
  421.    #2 has between 4 and 8 neighbors in state #1, then it will be in state #1
  422.    next generation; and if a cell in state #4 has between 5 and 8 neighbors
  423.    in state #1, then it will be in state #1 next generation.
  424.  
  425.      Following the same steps for state #4 instead of state #3 shows
  426.    that state #4 only preys upon two of the other states.  Thus, if a cell in
  427.    state #1 has 2 or 3 neighbors in state #4, then the cell will be empty the
  428.    next generation.  Also, If a cell in state #2 has 1, 2 or 3 neighbors in
  429.    state #4, then the cell will be empty next generation.
  430.  
  431.      By selecting different combinations of automaton, predator/virus and
  432.    prey icons, you can quickly change the behavior of the patterns of states.
  433.  
  434.  
  435.                   Species Model
  436.  
  437.      Each non-empty cell evolves from state #1 to state #4 to an empty
  438.    (dead) cell.  Thus, a cell in state #1 will be in cell #2 next generation,
  439.    in state #3 the following generation, then on to state #4 and will be
  440.    empty again the generation following that.
  441.  
  442.  
  443.    8
  444.  
  445.       Births are allowed when an empty cell has the proper number of breeding
  446.    neighbors.  A neighbor is considered a breeder if it is in state #2 or
  447.    state #3.  The default rule for the black automaton allows an empty cell
  448.    to give birth (i.e., become state #1 next generation) if between 2 and 5
  449.    of its neighbors are breeders.
  450.  
  451.  
  452.                    Cycles Model
  453.  
  454.      The key to this model is the Palette, which allows you to choose
  455.    an active state.  This active state can then be inserted into the boxes
  456.    to the right of an arrow or a colon.
  457.  
  458.      Look at the box labelled Cycles: this box shows you how a cell in
  459.    a non-empty state will evolve the next generation.  For example, in the
  460.    default rules, the first line in the Cycles box has state #1 evolving
  461.    into state #3, state #2 evolving into the off state (N stands for None),
  462.    state #3 evolving into state #2 and state #4 evolving into state #3.
  463.    Thus, a cell in state #4 would be in state #1 the next generation, state
  464.    #3 the following generation, state #2 the generation after that and would
  465.    finally become empty the subsequent generation.
  466.  
  467.      The Births section (in the center of the screen, top to bottom, 11
  468.    rows with colons in them) details how empty cells will evolve based upon
  469.    the type of neighbors they have.  In the row near the top of the screen,
  470.    again using the default rules, an empty cell having at least one neighbor
  471.    in each state would be in state #2 the next generation.  Likewise, a cell
  472.    with at least one neighbor in state #1, at least one neighbor in state #2
  473.    and at least one neighbor in state #3 (but no neighbors in state #4) would
  474.    be in state #3 the following generation (second row).
  475.  
  476.      You can change the Birth and Cycle rules by clicking the mouse while
  477.    the pointer is in any of the dark blue boxes to the right of a colon or an
  478.    arrow.  The contents of the selected box will be replaced with the icon of
  479.    the currently selected state in the Palette.  Thus, if you selected the N
  480.    icon in the Palette box (no state) and clicked in each of the boxes to the
  481.    right of arrow in the Cycle box, then all non-empty cells would be empty
  482.    the next generation,
  483.  
  484.  
  485.                  Modulo Math Model
  486.  
  487.      In this model, each cell is a computer that you can program.  Every
  488.    state has associated with it a value and an operation.  The value of the
  489.    state can be found below the state's icon on the left of the screen.  The
  490.    operation associated with the state can be found to the right of the icon
  491.    representing that state.  The available operations are as follows, reading
  492.    from left to right: addition, subtraction, multiplication, integer
  493.    division, modulo division and exponentiation.
  494.  
  495.      The value of the state can be modified by clicking the left mouse-
  496.    button when the pointer is over the value.  A pop-up menu appears allowing
  497.    you to select a value.  If the chosen value is being used by another state,
  498.    then that state's new value is the chosen state's old value. You may change
  499.    the operation of a state by selecting the new operation.
  500.  
  501.      At the start of every generation, each cell is assigned the value
  502.    associated with its state (empty cells are assigned the value 0).  Each
  503.    cell then has its value modified by its neighboring cells, starting with
  504.    neighbors in state #1 and continuing sequentially through neighbors in
  505.    state #4.
  506.  
  507.  
  508.    9
  509.  
  510.      In order to explain this model in more detail, I shall use examples
  511.    from the default rules for the black automaton.  The first state has a
  512.    value of 2 and the operation of addition.  Thus, whenever a cell has a
  513.    neighbor in state #1, the value of 2 is added to the current value of the
  514.    cell to yield the cell's new value.  After this operation, the cell's
  515.    current value is modified by modulo division, the base being the value
  516.    shown at the lower-left of the screen.  This modulo base may be changed
  517.    via the Modulo menu available only in this model.
  518.  
  519.      This operation described above is repeated for each of the cell's
  520.    neighbors in state #1.  Thus, if a cell has four neighbors in state #1,
  521.    then 2 would be added to the cell's value (modulo 10) to yield the cell's
  522.    new value; this would be repeated three more times to yield the cell's
  523.    value after interacting with its neighbors in state #1.  After finishing
  524.    with state #1, the cell would interact with its neighbors in state #2,
  525.    state #3 and state #4 (in that order).  Empty neighbors have no effect
  526.    upon the value of the cell.
  527.  
  528.      The new state of the cell is determined by the value the cell has
  529.    after interacting with its neighbors:  if the new value corresponds to
  530.    a value associated with a state, then the cell will be in that state the
  531.    next generation; otherwise, the cell will be empty the next generation.
  532.  
  533.      Finally, the method in which the operations are carried out requires
  534.    explaining.    In all cases, the value of a cell is operated UPON by the
  535.    value of its neighbors.  So if a cell currently has the value 4 and the
  536.    neighbor being tallied has the value 2, then the possible operations are
  537.    as follows:
  538.  
  539.               ADDITION           4 + 2 = 6
  540.               SUBTRACTION       4 - 2 = 2
  541.               MULTIPLICATION       4 * 2 = 8
  542.               INTEGER DIVISION       4 / 2 = 2
  543.               MODULO DIVISION       4 % 2 = 0
  544.               EXPONENTIATION       4 ^ 2 = 6
  545.  
  546.    The value for exponentiation is 6 instead of 16 because each operation is
  547.    divided modulo 10 (in the default rules).
  548.  
  549.  
  550.                   Circuits Model
  551.  
  552.      This model is similar to the above model, except that the values are
  553.    bit-patterns and the operations are the logical operations AND, OR, XOR,
  554.    NOT, NAND, NOR and XNOR.  The operations are carried out in the same manner
  555.    as in the Modulo Math Model, starting with neighbors in state #1 and ending
  556.    with neighbors in state #4.    Also, because these are logical operations
  557.    upon bit-patterns, no modulo division is performed after each operation.
  558.  
  559.      If a cell has a bit-pattern of 0101 and the neighbor being tallied
  560.    has a bit-pattern of 0011, then the new bit-pattern of the cell is as
  561.    follows for each of the logical operations:
  562.  
  563.                0101  AND   0011  = 0001
  564.                0101  OR    0011  = 0111
  565.                0101  XOR   0011  = 0110
  566.               NOT  0101          = 1010
  567.                0101  NAND  0011  = 1110
  568.                0101  NOR   0011  = 1000
  569.                0101  XNOR  0011  = 1001
  570.  
  571.  
  572.    10
  573.  
  574.                    Voting Model
  575.  
  576.      The icons represent four political factions: liberal (dove),
  577.    conservative (hawk), independent (middle-of-the-road) and extremist (time
  578.    bomb).  The default voting rule is that the the plurality wins, meaning
  579.    that a cell will evolve into the state of which the cell has the most
  580.    neighbors.  Thus, if a cell has three neighbors in state #1, two neighbors
  581.    in state #2, two empty neighbors and one neighbor in state #4, then the
  582.    cell will be in state #1 the next generation (regardless of the cell's
  583.    current state).
  584.  
  585.      You can limit or disable the default rule via the Elect menu, which
  586.    allows you to specify bounds within which a state can "win" an election.
  587.    For instance, suppose a cell has three neighbors of state #3 and no
  588.    others.  Normally, that cell would evolve into state #3 next generation.
  589.    However, if the election limits are from 4 to 6 (bottom left corner of
  590.    the screen), then the cell will be empty next generation because the
  591.    plurality wasn't large enough.
  592.  
  593.      You can alter the default rule further by invoking the special rules
  594.    of "siege" conversion, internal dissent and persuasion.  Any cell which
  595.    has the specified number of neighbors for each special rule will invoke
  596.    the special evolution indicated.  As in all the models, any conflict
  597.    results in an empty cell next generation.  The range of values which can
  598.    invoke a special rule can be changed by clicking the left mouse-button when
  599.    the pointer is over that rule's value-box.  A pop-up menu will appear which
  600.    allows you to select a new range of values or to disable the special rule.
  601.  
  602.      Consider the default rules for the black automaton: in the following
  603.    explanation of these special rules, I shall use the synonyms HAWK, MODERATE,
  604.    DOVE and EXTREMIST for states #1, #2, #3 and #4, respectively.  Then the
  605.    special rules are as follows:
  606.  
  607.               If a cell has       and the cell   then the cell
  608.               as neighbors          is in state    will become a(n)
  609.  
  610.    Siege conversion #1:  4 or more HAWKS     DOVE           EXTREMIST
  611.    Siege conversion #2:  5 or more DOVES     HAWK           EXTREMIST
  612.  
  613.    Internal dissent:     3 or more EXTREMISTS  EXTREMIST     EMPTY
  614.  
  615.    Persuasion #1:     5 or more DOVES       MODERATE      DOVE
  616.    Persuasion #2:     4 or more HAWKS       MODERATE      HAWK
  617.  
  618.    The five special rules above, if activated, have precedence over the
  619.    plurality rule, regardless of the election limits.  As always, any conflict
  620.    over the future of a cell results in that cell being empty next generation.
  621.  
  622.  
  623.                    Battle Model
  624.  
  625.      This model is designed to create pattens which can "move" about the
  626.    screen like spaceships in a video game.  While the general rules are fixed,
  627.    you can specify what happens when ships collide or are near a collision.
  628.    In the following discussion, I shall use the synonyms SHIP #1, COLLISION,
  629.    SHIP #2 and ENGINE for states #1, #2, #3 and #4, respectively.
  630.  
  631.  
  632.    11
  633.  
  634.      The three rules you can modify are as follows: 1) When a cell which
  635.    contains SHIP #1 has a neighbor containing a COLLISION, you can choose for
  636.    the cell to contain either a COLLISION or SHIP #1 next generation.  2) When
  637.    a cell which contains SHIP #2 has a neighbor containing a COLLISION, you
  638.    can choose for the cell to contain either a COLLISION or SHIP #2 next
  639.    generation.    3) When a cell contains SHIP #1 has a neighbor containing
  640.    SHIP #2, you can choose for the cell to contain a COLLISION, SHIP #1, or
  641.    SHIP #2 the next generation.
  642.  
  643.      For those interested in recreating this model (or some variant) on
  644.    their own, I include the pseudocode for the one-ship case; the two-ship
  645.    case is too complex to describe here.  Since only one ship is allowed, no
  646.    collisions are possible, so there are only three states possible: ship,
  647.    engine and empty.  Here is the algorithm (comments are in parentheses):
  648.  
  649.      IF cell IS engine THEN
  650.  
  651.         cell BECOMES empty
  652.  
  653.      ELSE IF cell IS ship
  654.  
  655.         cell BECOMES engine
  656.  
  657.      ELSE (cell IS empty)
  658.  
  659.         IF cell HAS 2 ship-neighbors THEN
  660.  
  661.            cell BECOMES ship
  662.  
  663.         ELSE
  664.  
  665.            cell REMAINS empty
  666.  
  667.         ENDIF
  668.  
  669.      ENDIF
  670.  
  671.  
  672.      This rule is simple enough that you can experiment on your own by
  673.    adding collisions, more ships, etc.    If there is enough interest, I may
  674.    release the two-ship algorithm that I use.
  675.  
  676.  
  677.    III) Population Mode
  678.  
  679.      This is essentially a sophisticated paint mode, except you are working
  680.    with cell states and automata instead of colors.  All of the features below
  681.    operate upon the Edit region, unless otherwise specified.  The Edit region
  682.    is a rectangle on the playfield which you can resize by selecting the Edit
  683.    region menu-item under the Special menu.  You then press the left mouse-
  684.    button (don't release it yet) when the pointer is at one corner of the new
  685.    region and drag the pointer to the other corner, where you finally release
  686.    the left mouse-button.  The contents of the region are copied to a buffer
  687.    for later pasting.
  688.  
  689.      The Paste All menu item allows you to paste the entire contents of
  690.    the edit region anywhere in the playfield (an outline of the new region
  691.    will follow the pointer).  The Paste some menu-item is similar, except
  692.    that it only copies non-empty cells in the edit region.  Finally, the
  693.    Paste one menu-item only copies the cells in the currently-selected state.
  694.    To get out of copy mode, select one of the patterns in the Pattens menu.
  695.  
  696.  
  697.    12
  698.  
  699.      The upper gadget allows you to choose between the cell states and
  700.    the automata.  The palette will display the state (automaton) icons when
  701.    you are modifying the cell-state (automaton) configurations.  The name
  702.    below the palette refers to the pattern which will be on the playfield
  703.    where you click the left mouse-button.  Thus, in Point mode you will
  704.    change individual cells, whereas in Block mode you will change four
  705.    cells at a time.  There are 64 patterns available in the Patterns menu
  706.    plus the Point mode in the Special menu.
  707.  
  708.      The row-and-column indicator displays the row and column of the
  709.    cell under the pointer.  When the pointer moves out of the playfield,
  710.    the row and column numbers are erased.
  711.  
  712.      The Replace gadget allows you to replace one state/automaton with
  713.    another (remember, these operations are performed upon all cells within
  714.    the Edit region).  When you click on this gadget, a prompt appears
  715.    asking you to select an icon.  The state/automaton you select will
  716.    replace whatever state/automaton was previously selected.
  717.  
  718.      The Swap gadget works much the same as the Replace gadget, except
  719.    that any occurrence of either of the two states/automata will be
  720.    replaced by the other state/automaton.
  721.  
  722.      The Remove gadget removes all instances of the selected state/
  723.    automaton from the Edit region.  The Clear gadget removes all states
  724.    from the Edit region when editing cell states.  When editing automata,
  725.    automata #2, #3, and #4 will be replaced by automata #1, since each cell
  726.    must have an automaton (a set of evolutionary rules) assigned to it.
  727.  
  728.      The Flood gadget will insert the selected state/automaton into
  729.    every cell of the Edit region.
  730.  
  731.      The Undo gadget will undo the most recent populate operation
  732.    performed.
  733.  
  734.      The Reflection gadgets are, from left to right: ULLR (upper-left
  735.    to lower-right), LLUR (lower-left to upper-right), Vertical and
  736.    Horizontal.    The names refer to the direction within the Edit Region
  737.    through which the cells are reflected.  Thus, if the Horizontal reflec-
  738.    tion is selected, the cells in the Edit reflection will be reflected
  739.    across the vertical line through the middle of the Edit region.
  740.  
  741.      The Randomization gadget fills a random distribution of cells in
  742.    the Edit region with the selected state/automaton.  The density at which
  743.    it populates cells within the region can be modified by choosing one of
  744.    the menu-items below the Randomization Density menu-item in the Special
  745.    Menu.
  746.  
  747.      The Rotation gadgets (90°, 180° and 270°) work the same as the
  748.    Reflection gadgets, with the exception that the cells within the Edit
  749.    region are rotated about the center of the region instead of being
  750.    reflected.  Since only square regions can be rotated, the rotation
  751.    will only be performed upon the largest square which can fit wholly
  752.    within the Edit region.
  753.  
  754.      The Translation gadgets shift the Edit region Left, Right, Up and
  755.    Down.  The shifts occur entirely within the Edit region; thus, a Right
  756.    translation will move the right-most column in the Edit region to the
  757.    left-most column in the region.  The number of cells to shift is given
  758.    by the value in the integer gadget right of the Translation gadgets.
  759.  
  760.  
  761.    13
  762.  
  763.      The Project Menu allows you to save/restore specific regions of
  764.    the screen.    You can save/restore either cell-state or automaton
  765.    patterns. When saving, only the cell states or the automata are saved,
  766.    depending upon which is being populated (see gadget at top of control
  767.    panel).
  768.  
  769.      The View menu allows you to pan and zoom through the playfield,
  770.    which can significantly reduce the effort involved in creating precise
  771.    patterns of cell states and/or automata.
  772.  
  773.  
  774.    IV) Music(?) Mode
  775.  
  776.      Automata allows you to create "music" based upon the cell patterns
  777.    at each generation.    Each of the ON states is assigned to one of the
  778.    Amiga's audio channels.  After each generation, the number of cells
  779.    in each state are counted and the notes and volumes to be played are
  780.    calculated.    Then the calculated notes are played until the next
  781.    generation or until the "music" is turned off by clicking the Music
  782.    gadget (earmuffs when off, musical notes when on).
  783.  
  784.      The notes to be played are calculated as follows: If the number of
  785.    cells in a state fall within the Low and High thresholds for that state,
  786.    a note will be played in the associated audio channel.  The note to be
  787.    played will fall between the Low and High note.  There is a direct
  788.    relationship between how far is the note played from the Low note and
  789.    how far is the number of cells in that state from the Low threshold.
  790.    The lower the number of cells in that state (while still between the
  791.    thresholds), the lower the note will be played.  Likewise, the higher
  792.    the number of cells, the higher the note played.
  793.  
  794.      The Project menu allows you to save and/or restore Music config-
  795.    urations.  The Icons menu allows you to display the icons with which you
  796.    are most familiar.
  797.  
  798.  
  799.    V) Icons Mode
  800.  
  801.      This is a paint mode which allows you to modify the icons used to
  802.    represent the states and automata.  Because you can zoom in and out to
  803.    three levels within the playfield, there are three sets of icons which
  804.    you can edit.  The Small, Medium and Large gadgets switch between those
  805.    three sets of icons.
  806.  
  807.      Below the icon-size gadgets lies the color palette.  The selected
  808.    color is the one which most paint operations will use.  If you click the
  809.    left mouse-button inside the magnified image of the selected icon, the
  810.    underlying pixel will be changed to the selected color.  The only
  811.    exception is color #1 (black), which is actually transparent for cell
  812.    states, allowing you to see part of the underlying automaton.
  813.  
  814.      The upper row of icon gadgets (below the magnified icon) are the
  815.    icons of the cell states; the left column of icon gadgets are the icons
  816.    of the automata.  Selecting any one of these gadgets will display a
  817.    magnified image of the associated icon, allowing you to make pixel-level
  818.    changes to the icon.  The matrix of icon images displays every possible
  819.    combination of cell states overlying automata.  This is of use in
  820.    avoiding icons which are difficult to distinguish from each other,
  821.    especially when the underlying automata icons show through.
  822.  
  823.  
  824.    14
  825.  
  826.      The Copy gadget allows you to copy one icon to another.  When you
  827.    select the Copy gadget, a prompt appears asking you to select an icon.
  828.    The icon you select will be replaced by the previously selected icon.
  829.  
  830.      The Swap gadget works much the same way as the Copy gadget, except
  831.    the two selected icons are swapped.
  832.  
  833.      The Dye gadget allows you to replace a color in an icon with
  834.    another color from the palette.  When you select the Dye gadget, you are
  835.    prompted to select another color.  The color you select will replace the
  836.    previously selected color within the currently selected icon.
  837.  
  838.      The Flood gadget will fill the selected icon with the selected
  839.    color.
  840.  
  841.      The Undo gadget will undo the most recent icon-edit operation.
  842.  
  843.      The Reset gadget will restore the icons which were in effect when
  844.    you entered the Icons Mode.
  845.  
  846.      The Project Menu allows you to save/restore icon images you
  847.    create.  If you don't like what you see, you can always change it.
  848.  
  849.  
  850.  
  851.    Bugs (things I did not have time to fix or replace):
  852.  
  853.      1) The Randomization Density menu-items in the Population mode
  854.         do not work correctly in this version.  I could neither find
  855.         nor recreate the original version of Automata, so you'll have
  856.         to be satisfied with this beta version. Sorry...
  857.  
  858.      2) The file requester (from Inovatronics) won't allow you to
  859.         create files, at least not easily.    Thus, if you want to save
  860.         the environment of any portion of Automata, you might want
  861.         to first create a dummy file with the desired name.
  862.  
  863.      3) When you run Automata, the memory allocated for the Micro and
  864.         Led fonts is not deallocated.  Thus, the first time (and ONLY
  865.         the first time) you run Automata, you will see a loss of about
  866.         5K of memory.  This memory isn't really lost, since these fonts
  867.         can be allocated by other tasks.
  868.  
  869.      4) I wanted to replace the simple sine-wave patterns I send to the
  870.         audio channels with digitized samples of violins, flutes, or
  871.         some other instrument.  I probably would have allowed you to
  872.         load digitized sounds from SMUS or IFF files or whatever.
  873.  
  874.  
  875.    VI) Limitations
  876.  
  877.      While Automata was designed to work in a multitasking environment,
  878.    it is possible to overload the Amiga when running Automata.    Running two
  879.    copies of Automata is one way to crash the Amiga (but only if both
  880.    copies are drawing to the screen).  Other tasks which directly access
  881.    the blitter may also experience difficulties when Automata is running,
  882.    though I have not tested this exhaustively.
  883.  
  884.